<template>
  <div id="head">
    <span class="back icon-back-white" @click="back"></span>
    <span slot="title" class="title">{{title}}</span>
  </div>
</template>

<script>
export default {
  props:{
    title: String
  },
  methods:{
    back(){
      window.history.go(-1)
    }
  }
}
</script>

<style scoped lang="less">
  #head {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 45px;
    line-height: 45px;
    background: #1cb4d4;
    z-index: 999;
    text-align: center;
  }
  .back{
    position: absolute;
    left: 10px;
    top: 12.5px;
    background-repeat:no-repeat;
    background-size: cover;
    width: 20px;
    height: 20px;
    display: inline-block;
  }
  .title{
    font-size: 16px;
    color: #ffffff;
  }
</style>
